package com.ruoyi.system.service.impl;

import com.ruoyi.system.domain.RxBusiness;
import com.ruoyi.system.mapper.RxBusinessMapper;
import com.ruoyi.system.service.IRxBusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 商家Service业务层处理
 *
 * @author hjf
 * @date 2025-02-18
 */
@Service
public class RxBusinessServiceImpl implements IRxBusinessService {
    @Autowired
    private RxBusinessMapper rxBusinessMapper;

    /**
     * 查询商家
     *
     * @param id 商家主键
     * @return 商家
     */
    @Override
    public RxBusiness selectRxBusinessById(Long id) {
        return rxBusinessMapper.selectRxBusinessById(id);
    }

    /**
     * 查询商家列表
     *
     * @param rxBusiness 商家
     * @return 商家
     */
    @Override
    public List<RxBusiness> selectRxBusinessList(RxBusiness rxBusiness) {
        return rxBusinessMapper.selectRxBusinessList(rxBusiness);
    }

    /**
     * 新增商家
     *
     * @param rxBusiness 商家
     * @return 结果
     */
    @Override
    public int insertRxBusiness(RxBusiness rxBusiness) {
        return rxBusinessMapper.insertRxBusiness(rxBusiness);
    }

    /**
     * 修改商家
     *
     * @param rxBusiness 商家
     * @return 结果
     */
    @Override
    public int updateRxBusiness(RxBusiness rxBusiness) {
        return rxBusinessMapper.updateRxBusiness(rxBusiness);
    }

    /**
     * 批量删除商家
     *
     * @param ids 需要删除的商家主键
     * @return 结果
     */
    @Override
    public int deleteRxBusinessByIds(Long[] ids) {
        return rxBusinessMapper.deleteRxBusinessByIds(ids);
    }

    /**
     * 删除商家信息
     *
     * @param id 商家主键
     * @return 结果
     */
    @Override
    public int deleteRxBusinessById(Long id) {
        return rxBusinessMapper.deleteRxBusinessById(id);
    }
}
